{include file="public/header" /}
<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.goods_category}</h3>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>

    <form id="goods_class_form" enctype="multipart/form-data" method="post" action='category_son_add'>
        <table class="ds-default-table">
            <tbody>
                <tr class="noborder">
                    <td colspan="2" class="required"><label class="validation" for="gc_name">{$Think.lang.son_goods_category_name}:</label></td>
                </tr>
                <tr class="noborder">
                    <td class="vatop rowform"><input type="text" value="" name="title" id="title" maxlength="20" class="txt"></td>
                </tr>
                <tr>
                    <td colspan="2" class="required"><label for="parent_id">{$Think.lang.son_goods_category_status}:</label></td>
                </tr>
                <tr class="noborder">
                    <td class="vatop rowform">
                      <div class="onoff">
                        <label for="site_state1" class="cb-enable selected" >{$Think.lang.ds_open}</label>
                        <label for="site_state0" class="cb-disable">{$Think.lang.ds_close}</label>
                        <input id="site_state1" name="status" value="0" type="radio" checked="checked">
                        <input id="site_state0" name="status" value="1" type="radio">
                    </div>
                          </td>
                </tr>
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="2">
                      <input class="btn" type="hidden" value="{$category_id}" name='category_id'/>
                      <input class="btn" type="button" value="{$Think.lang.ds_submit}" id='aa'/></td>
                </tr>
            </tfoot>
        </table>
    </form>
</div>
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js" charset="utf-8"></script>
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/jquery.mousewheel.js"></script> 
<script>
//按钮先执行验证再提交表单
              $(function() {
                   $('.btn').click(function(){
                      var title = $("#title").val();
                      if(title == ""){
                        layer.msg("请输入品类名称");
                        return false;
                      } 
                      var x_id = $("#x_id").val(); 
                      $('#goods_class_form').submit();     
                   });
                });
              gcategoryInit('gcategory');
</script> 


